import React, { Component } from 'react';
import './confirm.scss'
class Confirm extends Component {
    constructor(props) {
        super(props);
        this.state = {}
    }
    render() {
        return (
            <div>
                {this.props.state ? (
                    <div class="ui-dialog show">
                        <div class="ui-dialog-cnt">
                            <div class="ui-dialog-bd">
                                <p>{this.props.content}</p>
                            </div>
                            <div class="ui-dialog-ft">
                                <button type="button" onClick={this.handleClick.bind(this)} data-role="button">确定</button>
                            </div>
                        </div>
                    </div>
                ) : ''}
            </div>
        );
    }
    handleClick(){
        this.props.setConfirm()
    }
}

export default Confirm;